package com.example.dao;

import com.example.entity.ChongzhirecordInfo;
import com.example.entity.SigninusersInfo;
import com.example.vo.ChongzhirecordInfoVo;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import org.springframework.stereotype.Repository;
import tk.mybatis.mapper.common.Mapper;

import java.util.List;
import java.util.Map;

@Repository
public interface ChongzhirecordInfoDao extends Mapper<ChongzhirecordInfo> {
    List<ChongzhirecordInfoVo> findByNames(@Param("names") String names);
	List<ChongzhirecordInfoVo> findByNameslist2(@Param("names") String names,@Param("username") String username);
        
	//xiugaimimazy
    int checkRepeat(@Param("column") String column, @Param("value") String value, @Param("id") Long id);
    
    Integer count();
	
	@Select("select * from chongzhirecord_info where username = #{username}")
    ChongzhirecordInfo selectByUsername(String username);
	
	@Select("SELECT * FROM chongzhirecord_info order by id")
    List<Map<String, Object>> daochuexcel();
	
	@Select("SELECT xxdiquziduanxxxx,count(id) as hsggs FROM chongzhirecord_info  group by xxdiquziduanxxxx")
    List<Map<String,String>> findByDiqu();
	
	
	
	
	
	
    
	
	
	
	//wexixinxzhuaxnyoxng
	
	@Select("select * from chongzhirecord_info where username = #{username}")
    List<ChongzhirecordInfo> findByusername(SigninusersInfo signinusersInfo);
    

}
